feat(contractor-invoices): support skipping a scheduled invoice and previewing a draft invoice PDF - #1265
Open
cammellos wants to merge 2 commits into
Open
feat(contractor-invoices): support skipping a scheduled invoice and previewing a draft invoice PDF#1265cammellos wants to merge 2 commits into
cammellos wants to merge 2 commits into
Conversation
…reviewing a draft invoice PDF Wires the SDK up to the two new eor_web capabilities from tiger MR !92157: skipping an existing invoice schedule (PATCH status: deleted) and previewing a contractor invoice as a draft PDF before it's created. Neither existed in the SDK before this, including in the generated OpenAPI client — those bindings are hand-added here (matching hey-api's output shape) from a spec generated locally via `mix eorapidocs` against the rebased backend branch, since the backend MR hasn't merged/deployed yet.
Contributor
📦 Bundle Size Report
Size Limits
Largest Files (Top 5)
View All Files (421 total)
✅ Bundle size check passed |
Contributor
📊 Coverage Report✅ Coverage increased! 🎉
Detailed BreakdownLines Coverage
Statements Coverage
Functions Coverage
Branches Coverage
✅ Coverage check passed |
Contributor
|
Deploy preview for adp-cost-calculator ready!
Deployed with vercel-action |
Contributor
|
Deploy preview for remote-flows ready!
Deployed with vercel-action |
…v auth fallback fetchAccessToken() required an interactively-obtained VITE_REFRESH_TOKEN even for VITE_REMOTE_GATEWAY=local, where no such token exists; falls back to the same JWT-bearer flow fetchCompanyManagerToken() already uses via VITE_USER_ID.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Wires the SDK up to the two new eor_web capabilities from tiger MR !92157:
SkipInvoiceScheduleButtoncancels the schedule loaded on thecreate_invoice_schedulestep (PATCH .../contractor-invoice-schedules/:idwithstatus: "deleted") and returns the wizard to theinvoice_schedulestep.PreviewInvoiceButtongenerates a draft (non-persisted) PDF preview from the current, unsavedcreate_invoice_scheduleform values via the newPOST /employments/:id/contractor-invoices/previewendpoint.Neither capability existed in the SDK before this, including in the generated OpenAPI client — those bindings are hand-added in
src/client/{sdk.gen.ts,types.gen.ts,index.ts}(matching hey-api's output shape) from a spec generated locally viamix eorapidocsagainst the rebased backend branch, since the backend MR hasn't merged/deployed yet. This should be reconciled with a full client regeneration (npm run openapi-ts) once !92157 is deployed to production.Context
This builds on Gabriel's merged two-step invoice-schedule flow (
invoice_schedule+create_invoice_schedule, create/update/prefill). A separate, now-superseded branch (#1251) attempted an earlier single-step version of this work before that flow existed — closed in favor of this, built cleanly on top of the currentmain.Test plan
buildInvoicePreviewPayload(tests/utils.test.ts)ContractorOnboarding.test.tsx: skip flow, preview flow (asserting the request omitsperiodicity/nr_occurrences), and error-path field-error surfacingtsc --noEmit,oxlint,oxfmtcleanexample/src/ContractorOnboarding.tsxagainst a locally running tiger backend